{if $assignedTasksCount > 0}
<div class="block">
	<div class="block_header"><a href="{plink Task:assignedTasks}">Mnou přidělené úkoly ({$assignedTasksCount})</a></div>
	<div class="block_body">
		<div class="block_start"></div>
						  
		<table class="my_tasks">
							  {foreach $assignedTasks->order('if(isnull(task.deadline),1,0),task.deadline')->limit(5) as $task}
			<tr class="my_tasks_task_line" data-id="{$task[id]}" data-id="{$task[id]}" data-status="{$task[task_status_id]}" data-completed="{$task[completed]}" data-creator="{= (int)($user->id == $task[creator_id])}" data-worker="{= (int)($user->id == $task[worker_id])}">
				<td class="my_tasks_priority priority{$task->task_priority[priority]}"></td>
				<td class="my_tasks_project">{$task->project[name]}</td>
				<td class="my_tasks_task_name">{$task[name]}</td>
				<td class="my_tasks_deadline">{if $task[deadline] > 0}{!$task[deadline]|remaining_days}{/if}</td>
				<td class="my_tasks_completed"><div class="my_tasks_completed_graph"><div class="my_tasks_completed_bar" style="width: {$task[completed]}%"></div><div class="my_tasks_completed_text">{$task[completed]}%</div></div></td>
				<td class="my_tasks_actions"><a href="{plink Task:task $task['id']}"><img src="{$basePath}/images/info.png" alt="I"></a> <a href="javascript:void(0)" class="menuImage"><img src="{$basePath}/images/action.png" alt="A"></a></td>
			</tr>
						  {/foreach}
		</table>
		<div class="explanation">
			<div class="exp_priorities">{foreach $priorities as $priority}<div class="exp_priority priority{$priority[priority]}"></div> {$priority[name]} {/foreach}</div>
		</div>
						  
	</div>
</div>
{else}
<!-- No assigned tasks -->
{/if}